﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.Serialization;

namespace EEA.SOACommerce.Shared.ServiceContracts.CatalogService
{
    [DataContract]
    public class Category
    {
        [DataMember]
        public int CategoryId { get; set; }
        [DataMember]
        public string CategoryName { get; set; }        
        [DataMember]
        public byte DisplayOrder { get; set; }
        [DataMember]
        public List<Category> SubCategoryList { get; set; }

        public bool HasSubCategory
        {
            get
            {
                return this.SubCategoryList.Count > 0;
            }
        }
    }
}
